<!--{eval $feedNewest = 0}-->
<!--{if !$_G['inajax']}-->
<!--{eval $home_run = true;}-->
<!--{eval $pageview = lang('home/template','feed');}-->
<!--{template home/space_header}-->
<!--{template home/space_site_left}-->
				<!--{subtemplate home/space_short_profile}-->
            	<!--{template home/space_simple_share}-->
                <ul id="woogtv" class="tb cl woo-bg-color">
                    <li$actives[we]><a href="home.php?mod=space&username=$space[username]&do=home&view=we">{lang friend_feed}</a></li -->
                    <li$actives[me]><a href="home.php?mod=space&username=$space[username]&do=home&view=me">{lang my_feed}</a></li -->
                    <!-- li$actives[all]><a href="home.php?mod=space&do=home&view=all">{lang view_all}</a></li -->
                    <!--{if $_G['setting']['my_app_status']}-->
                    <li$actives[app]><a href="home.php?mod=space&do=home&view=app">{lang view_app_feed}</a></li>
                    <!--{/if}-->
                    <!--{hook/space_home_navlink}-->
                    <!--{if $_G['setting']['magicstatus'] && $_G['setting']['magics']['thunder'] && $_G['uid'] == $space['uid']}-->
                    <li class="y"><a id="a_magic_thunder" href="home.php?mod=magic&mid=thunder" onclick="showWindow('magics', this.href, 'get', 0)">{$_G[setting][magics][thunder]}</a></li>
                    <!--{/if}-->
                </ul>
                <div class="bm nobtop">
                    <div class="dxb_bc">
                        <div id="feed_div" class="e" style="margin-left:-1px;">
<!--{else}-->
<!--{template common/header_ajax}-->
<!--{/if}--> 
                        <!--{if $list}-->
                            <!--{if $_GET[view] == 'app' && $_G['setting']['my_app_status']}-->
                                <div class="xld xlda mtm">
                                    <!--{loop $list $appicon $values}-->
                                        <dl class="bbda cl">
                                            <dd class="m avt">
                                                <a href="userapp.php?mod=app&id=$appicon"><img src="http://appicon.manyou.com/logos/$appicon" alt="" /></a>
                                            </dd>
                                            <dd class="cl dd">
                                                <ul class="el">
                                                    <!--{loop $values $value}-->
                                                    <li class="cl">
                                                        <a class="t" href="userapp.php?icon=$value[icon]" title="{lang just_look_dynamic}">
                                                            <img width="16" height="16" {if $_G[cache][myapp][$value[icon]][icon]}src="$_G[cache][myapp][$value[icon]][icon]" onerror="this.onerror=null;this.src='http://appicon.manyou.com/icons/$value[icon]'"{else} src="http://appicon.manyou.com/icons/$value[icon]"{/if} />
                                                        </a>
                                                        $value[title_template] <span class="xg1"><!--{date($value[dateline], 'H:i d/m')}--></span>
                
                                                        <div class="ec">
                                                            <!--{if $value['image_1']}-->
                                                            <a href="$value[image_1_link]"{$value[target]}><img src="$value[image_1]" class="tn" /></a>
                                                            <!--{/if}-->
                                                            <!--{if $value['image_2']}-->
                                                            <a href="$value[image_2_link]"{$value[target]}><img src="$value[image_2]" class="tn" /></a>
                                                            <!--{/if}-->
                                                            <!--{if $value['image_3']}-->
                                                            <a href="$value[image_3_link]"{$value[target]}><img src="$value[image_3]" class="tn" /></a>
                                                            <!--{/if}-->
                                                            <!--{if $value['image_4']}-->
                                                            <a href="$value[image_4_link]"{$value[target]}><img src="$value[image_4]" class="tn" /></a>
                                                            <!--{/if}-->
                
                                                            <!--{if $value['body_template']}-->
                                                            <div class="detail"{if $value['image_3']} style="clear: both; zoom: 1;"{/if}>
                                                                $value[body_template]
                                                            </div>
                                                            <!--{/if}-->
                                                            <!--{if $value['body_general']}-->
                                                            <div class="">$value[body_general]</div>
                                                            <!--{/if}-->
                                                        </div>
                                                    </li>
                                                <!--{/loop}-->
                                                </ul>
                                            </dd>
                                        </dl>
                                    <!--{/loop}-->
                                </div>
                            <!--{else}-->
                                <div class="xld xlda mtm">
                                <!--{loop $list $day $values}-->
                                    <!--{if $_GET['view']!='hot'}-->
                                        <h4 class="et" style="display:none;">
                                            <span><!--{if $day=='yesterday'}-->{lang yesterday}<!--{elseif $day=='today'}-->{lang today}<!--{else}-->$day<!--{/if}--></span>
                                        </h4>
                                    <!--{/if}-->
                                    <!-- HIEN THI FEED NEW -->
                                    <!--{loop $values $value}-->
                                    	<!--{if $feedNewest == 0}-->
                                    		<!--{eval $feedNewest = $value['feedid'];}-->
                                    	<!--{/if}-->
                                        <!--{if $_G['inajax'] && $loadfeedNewest && $feedNewest}-->
                                        <script type="text/javascript" reload="1">
                                        	var feedNewestL = parseInt({$feedNewest});
										</script>
                                        <!--{/if}-->
                                        <!--{eval $morelist = $more_list[$day][$value[uid]];}-->
                                     <dl class="bbda cl">
                                        <dd class="m avt">
                                            <!--{if $value[uid]}-->
                                                <a href="home.php?mod=space&uid=$value[uid]" c="1"><!--{avatar($value[uid],small)}--></a>
                                                <!--p><a href="home.php?mod=space&uid=$value[uid]" title="$value[username]">$value[username]</a></p -->
                                            <!--{else}-->
                                                <img src="{IMGDIR}/systempm.png" width="48" height="48" alt="" />
                                            <!--{/if}-->
                                        </dd>
                                        <dd class="cl dd" style="width:460px;">
                                            <ul class="el">
                                                <!--{template home/space_feed_li}-->
                                            </ul>
                                        <!--{if $morelist}-->
                                        <!--{eval $langmoreuser = "lang('home/template', 'open')";}-->
                                            <p class="xg1 cl feed_small"><span onclick="showmore('$day', '$value[uid]', '$value[username]', this);" class="unfold">{lang open} $value[username]</span></p>
                                            <div id="feed_more_div_{$day}_{$value[uid]}" style="display:none;">
                                                <ul class="el">                    
                                                <!--{loop $morelist $value}-->
                                                    <!--{template home/space_feed_li}-->
                                                <!--{/loop}-->
                                                </ul>
                                            </div>
                                            <!--{eval $more_list[$day][$value[uid]] = '';}-->
                                        <!--{/if}-->
                                        </dd>
                                    </dl>
                                    <!--{/loop}-->                        
                                <!--{/loop}-->
                                </div>
                            <!--{/if}-->
                        <!--{elseif $feed_users}-->
                            <div class="xld xlda mtm">
                            <!--loop $feed_users $day $users-->
                                <h4 class="et" style="display:none;">
                                    <!--{if $day=='yesterday'}-->{lang yesterday}<!--{elseif $day=='today'}-->{lang today}<!--{else}-->$day<!--{/if}-->
                                </h4>
                                <!--loop $users $user-->
                                    <!--{eval $daylist = $feed_list[$day];}-->
                                    <!--{eval $morelist = $more_list[$day][$user[uid]];}-->
                                    <!--{loop $daylist $value}-->
                                    <dl class="bbda cl">
                                        <dd class="m avt">
                                            <!--{if $user[uid]}-->
                                                <a href="home.php?mod=space&uid=$value[uid]" c="1"><!--{avatar($value[uid],small)}--></a>
                                                <!-- p><a href="home.php?mod=space&uid=$user[uid]" title="$user[username]">$user[username]</a></p -->
                                            <!--{else}-->
                                                <img src="{IMGDIR}/systempm.png" width="48" height="48" alt="" />
                                            <!--{/if}-->
                                        </dd>
                                        <dd class="cl dd">
                                            <ul class="el">
                                                <!-- loop $daylist $value -->
                                                    <!-- Hien thi tat ca cac feed moi cap nhat -->
                                                    <!--{template home/space_feed_li}-->
                                                <!-- /loop -->
                                            </ul>
            
                                            <!--{if $morelist}-->
                                            <!--{eval $langmoreuser = "lang('home/template', 'open')";}-->
                                                <p class="xg1 cl feed_small"><span onclick="showmore('$day', '$user[uid]', this);" class="unfold">{lang open}</span></p>
                                                <div id="feed_more_div_{$day}_{$user[uid]}" style="display:none;">
                                                    <ul class="el">
                                                        
                                                    <!--{loop $morelist $value}-->
                                                        <!--{template home/space_feed_li}-->
                                                    <!--{/loop}-->
                                                    </ul>
                                                </div>
                                            <!--{/if}-->
                                        </dd>
                                    </dl>
                                    <!--{/loop}-->
                                <!--/loop-->
                            <!--/loop-->
                            </div>
                        <!--{/if}-->
            
                        <!--{if $filtercount}-->
                            <div class="i" id="feed_filter_notice_{$start}">
                                {lang depending_your} <a href="home.php?mod=spacecp&ac=privacy&op=filter" class="xi2 xw1">{lang filter_settings}</a>,{lang shield_feed_message} (<a href="javascript:;" onclick="filter_more($start);" id="a_feed_privacy_more" class="xi2">{lang click_view}</a>)
                            </div>
                            <div id="feed_filter_div_{$start}" style="display:none;">
                                <h4 class="et">{lang following_feed_shielding}</h4>
                                <ul class="el">
                                <!--{loop $filter_list $value}-->
                                    <!--{template home/space_feed_li}-->
                                <!--{/loop}-->
                                <li><a href="javascript:;" onclick="filter_more($start);">&laquo; {lang pack_up}</a></li>
                                </ul>
                            </div>
                        <!--{/if}-->
<!--{if !$_G['inajax']}-->
                        </div>
                        <!--/id=feed_div-->
                        <div id="load_more"></div>
                        <div id="loading_more_feed" style="display:none"></div>
                        <!--{hook/space_home_bottom}-->
                        <div id="ajax_wait"></div>
                    </div>
                </div>
<!--{template home/space_site_right}-->

<!--eval my_checkupdate();-->

<script type="text/javascript">
	function filter_more(id) {
		if($('feed_filter_div_'+id).style.display == '') {
			$('feed_filter_div_'+id).style.display = 'none';
			$('feed_filter_notice_'+id).style.display = '';
		} else {
			$('feed_filter_div_'+id).style.display = '';
			$('feed_filter_notice_'+id).style.display = 'none';
		}
	}

	function close_feedbox() {
		var x = new Ajax();
		x.get('home.php?mod=spacecp&ac=common&op=closefeedbox', function(s){
			$('feed_box').style.display = 'none';
		});
	}

	function showmore(day, uid, username, e) {
		var obj = 'feed_more_div_'+day+'_'+uid;
		$(obj).style.display = $(obj).style.display == ''?'none':'';
		if(e.className == 'unfold'){
			e.innerHTML = '{lang pack_up}';
			e.className = 'fold';
		} else if(e.className == 'fold') {
			e.innerHTML = '{lang open} ' + username;
			e.className = 'unfold';
		}
	}

	var elems = selector('li[class~=magicthunder]', $('feed_div'));
	for(var i=0; i<elems.length; i++){
		magicColor(elems[i]);
	}

	function showEditAvt(id) {
		$(id).style.display = $(id).style.display == '' ? 'block' : '';
	}
	if($('edit_avt') && BROWSER.ie && BROWSER.ie == 6) {
		_attachEvent($('edit_avt'), 'mouseover', function () { showEditAvt('edit_avt_tar'); });
		_attachEvent($('edit_avt'), 'mouseout', function () { showEditAvt('edit_avt_tar'); });
	}
	<!--{if !$_G['gp_diy']}-->
	var feedNewest = parseInt($feedNewest);
	var loadfeed = true;
	var url = 'home.php?mod=space&do=home&uid=$space[uid]&view={$_GET[view]}&order=dateline';
	<!--{/if}-->
</script>
<!--{if $_G['gp_diy'] == 'yes'}-->
<!--{subtemplate home/space_diy}-->
<!--{/if}-->
<!--{template common/footer}-->
<!--{else}-->
<!--{template common/footer_ajax}-->
<!--{/if}-->